package leaf.science.ui.jogwheel
{
	import fl.motion.Animator;
	import fl.motion.MotionEvent;
	
	import flash.events.Event;
	

	public class JogWheelAnimatorOut extends Animator
	{
		[Embed (source="../library/jogWheelMotionOut.xml", mimeType="application/octet-stream")]
		private var motionInDef:Class;
		private var motionInXML:XML = new XML(new motionInDef());
		
		private var jogWheel:JogWheel;
		
		public function JogWheelAnimatorOut(jogWheel:JogWheel)
		{
			this.jogWheel = jogWheel;
			super(motionInXML, jogWheel);
//			jogWheel.range.start = 0;
//			jogWheel.range.end = 1;
//			jogWheel.value = 0.7;
//			addEventListener(MotionEvent.MOTION_UPDATE, onUpdate);
			play();
		}
		
		private function onUpdate (evt:Event):void
		{
			jogWheel.value = 1 - jogWheel.filters[0].blurX / 200;
		}
		
	}
}